package com.xdb.sqlparser.parser;
/**
 * SQL标记
 * 
 * @author woate
 *
 */
public enum SQLToken {
	SELECT("SELECT"), DELETE("DELETE"), INSERT("INSERT"), UPDATE("UPDATE"),

	FROM("FROM"), HAVING("HAVING"), WHERE("WHERE"), ORDER("ORDER"), BY("BY"), GROUP("GROUP"), INTO("INTO"), AS("AS"),

	CREATE("CREATE"), ALTER("ALTER"), DROP("DROP"), SET("SET"),

	NULL("NULL"), NOT("NOT"), DISTINCT("DISTINCT"),

	TABLE("TABLE"), TABLESPACE("TABLESPACE"), VIEW("VIEW"), SEQUENCE("SEQUENCE"), TRIGGER("TRIGGER"), USER("USER"), INDEX("INDEX"), SESSION("SESSION"), PROCEDURE("PROCEDURE"), FUNCTION("FUNCTION"),

	PRIMARY("PRIMARY"), KEY("KEY"), DEFAULT("DEFAULT"), CONSTRAINT("CONSTRAINT"), CHECK("CHECK"), UNIQUE("UNIQUE"), FOREIGN("FOREIGN"), REFERENCES("REFERENCES"),

	EXPLAIN("EXPLAIN"), FOR("FOR"), IF("IF"),

	ALL("ALL"), UNION("UNION"), EXCEPT("EXCEPT"), INTERSECT("INTERSECT"), MINUS("MINUS"), INNER("INNER"), LEFT("LEFT"), RIGHT("RIGHT"), FULL("FULL"), OUTER("OUTER"), JOIN("JOIN"), ON("ON"), SCHEMA(
			"SCHEMA"), CAST("CAST"), COLUMN("COLUMN"), USE("USE"), DATABASE("DATABASE"), TO("TO"),

	AND("AND"), OR("OR"), XOR("XOR"), CASE("CASE"), WHEN("WHEN"), THEN("THEN"), ELSE("ELSE"), END("END"), EXISTS("EXISTS"), IN("IN"),

	NEW("NEW"), ASC("ASC"), DESC("DESC"), IS("IS"), LIKE("LIKE"), ESCAPE("ESCAPE"), BETWEEN("BETWEEN"), VALUES("VALUES"), INTERVAL("INTERVAL"),

	LOCK("LOCK"), SOME("SOME"), ANY("ANY"), TRUNCATE("TRUNCATE"),

	// mysql
	TRUE("TRUE"), FALSE("FALSE"), LIMIT("LIMIT"), KILL("KILL"), IDENTIFIED("IDENTIFIED"), PASSWORD("PASSWORD"), DUAL("DUAL"), BINARY("BINARY"), SHOW("SHOW"), REPLACE("REPLACE"),

	// postgresql
	WINDOW("WINDOW"), OFFSET("OFFSET"), ROW("ROW"), ROWS("ROWS"), ONLY("ONLY"), FIRST("FIRST"), NEXT("NEXT"), FETCH("FETCH"), OF("OF"), SHARE("SHARE"), NOWAIT("NOWAIT"), RECURSIVE("RECURSIVE"), TEMPORARY(
			"TEMPORARY"), TEMP("TEMP"), UNLOGGED("UNLOGGED"), RESTART("RESTART"), IDENTITY("IDENTITY"), CONTINUE("CONTINUE"), CASCADE("CASCADE"), RESTRICT("RESTRICT"), USING("USING"), CURRENT(
			"CURRENT"), RETURNING("RETURNING"), COMMENT("COMMENT"), OVER("OVER"), TYPE("TYPE"),

	// oracle
	START("START"), PRIOR("PRIOR"), CONNECT("CONNECT"), WITH("WITH"), EXTRACT("EXTRACT"), CURSOR("CURSOR"), MODEL("MODEL"), MERGE("MERGE"), MATCHED("MATCHED"), ERRORS("ERRORS"), REJECT("REJECT"), UNLIMITED(
			"UNLIMITED"), BEGIN("BEGIN"), EXCLUSIVE("EXCLUSIVE"), MODE("MODE"), WAIT("WAIT"), ADVISE("ADVISE"), SYSDATE("SYSDATE"), DECLARE("DECLARE"), EXCEPTION("EXCEPTION"), GRANT("GRANT"), REVOKE(
			"REVOKE"), LOOP("LOOP"), GOTO("GOTO"), COMMIT("COMMIT"), SAVEPOINT("SAVEPOINT"), CROSS("CROSS"),

	PCTFREE("PCTFREE"), INITRANS("INITRANS"), MAXTRANS("MAXTRANS"), INITIALLY("INITIALLY"), 
	/**
	 * 启用约束
	 */
	ENABLE("ENABLE"), 
	/**
	 * 禁用约束
	 */
	DISABLE("DISABLE"), SEGMENT("SEGMENT"), CREATION("CREATION"), IMMEDIATE("IMMEDIATE"), DEFERRED(
			"DEFERRED"), STORAGE("STORAGE"), MINEXTENTS("MINEXTENTS"), MAXEXTENTS("MAXEXTENTS"), MAXSIZE("MAXSIZE"), PCTINCREASE("PCTINCREASE"), FLASH_CACHE("FLASH_CACHE"), CELL_FLASH_CACHE(
			"CELL_FLASH_CACHE"), KEEP("KEEP"), NONE("NONE"), LOB("LOB"), STORE("STORE"), CHUNK("CHUNK"), CACHE("CACHE"), NOCACHE("NOCACHE"), LOGGING("LOGGING"), NOCOMPRESS("NOCOMPRESS"), KEEP_DUPLICATES(
			"KEEP_DUPLICATES"), EXCEPTIONS("EXCEPTIONS"), PURGE("PURGE"),

	COMPUTE("COMPUTE"), ANALYZE("ANALYZE"), OPTIMIZE("OPTIMIZE"),

	// transact-sql
	TOP("TOP"),

	ARRAY("ARRAY"),

	// hive

	EOF, ERROR, IDENTIFIER, HINT, VARIANT, LITERAL_INT, LITERAL_FLOAT, LITERAL_HEX, LITERAL_CHARS, LITERAL_NCHARS,

	LITERAL_ALIAS, LINE_COMMENT, MULTI_LINE_COMMENT,

	// Oracle
	BINARY_FLOAT, BINARY_DOUBLE,

	// odps,hive
	PARTITION, PARTITIONED, OVERWRITE,

	LPAREN("("), RPAREN(")"), LBRACE("{"), RBRACE("}"), LBRACKET("["), RBRACKET("]"), SEMI(";"),
	/**
	 * 逗号
	 */
	COMMA(","), DOT("."), DOTDOT(".."), DOTDOTDOT("..,"), EQ("="), GT(">"), LT("<"), BANG("!"), BANGBANG("!!"), TILDE("~"), QUES("?"), COLON(":"), COLONCOLON(":"), COLONEQ(":="), EQEQ("=="), LTEQ(
			"<="), LTEQGT("<=>"), LTGT("<>"), GTEQ(">="), BANGEQ("!="), BANGGT("!>"), BANGLT("!<"), AMPAMP("&&"), BARBAR("||"), BARBARSLASH("||/"), BARSLASH("|/"), PLUS("+"), SUB("-"), STAR("*"), SLASH(
			"/"), AMP("&"), BAR("|"), CARET("^"), PERCENT("%"), LTLT("<<"), GTGT(">>"), MONKEYS_AT("@"), POUND("#");

	public final String name;

	SQLToken() {
		this(null);
	}

	SQLToken(String name) {
		this.name = name;
	}
}
